{extend name="public/base" /}
{block name="title"}操作记录列表{/block}

{block name="content"}
<h2 class="sub-header">操作记录列表 <small class="badge"><?php echo $list->total(); ?> 条</small></h2>[ <a onclick="confirm_prompt('{:url('clear')}')" href="javascript:;">清空记录</a> ]<br><br>

<form name="listarc"><div class="table-responsive"><table class="table table-striped table-hover">
<thead>
<tr>
	<th>ID</th>
	<th>模块</th>
	<th>操作者</th>
	<th>操作记录</th>
	<th>来源</th>
	<th>IP地址</th>
	<th>操作时间</th>
	<th>操作</th>
</tr>
</thead>
<tbody>
<?php if ($list) { foreach ($list as $row) { ?>
<tr>
	<td><?php echo $row['id']; ?></td>
	<td><a href="{:url('index')}?type=<?php echo $row['type']; ?>"><?php echo $row['type_text']; ?></a></td>
	<td><a href="{:url('index')}?login_id=<?php echo $row['login_id']; ?>"><?php if (!empty($row['login_name'])) { echo $row['login_name']; } else { echo '未登录'; } ?></a></td>
	<td style="width:300px;word-wrap:break-word;white-space:normal;word-break:break-all;">【<a href="{:url('index')}?http_method=<?php echo $row['http_method']; ?>"><?php echo $row['http_method']; ?></a>】<a href="<?php echo $row['url']; ?>" target="_blank"><?php echo $row['url']; ?></a> <?php if ($row['content']) { echo ' - ' . htmlentities($row['content'], ENT_QUOTES, "UTF-8"); } ?></td>
	<td style="width:300px;word-wrap:break-word;white-space:normal;word-break:break-all;"><a href="<?php echo $row['http_referer']; ?>" target="_blank"><?php echo $row['http_referer']; ?></a></td>
	<td><a href="{:url('index')}?ip=<?php echo $row['ip']; ?>"><?php echo $row['ip']; ?></a> <a href="https://www.baidu.com/s?wd=<?php echo $row['ip']; ?>" target="_blank">查看</a></td>
	<td><?php echo date('Y-m-d H:i:s', $row['add_time']); ?></td>
	<td><a onclick="delconfirm('<?php echo url('del').'?id=' . $row['id']; ?>')" href="javascript:;">删除</a></td>
</tr>
<?php } } ?>
</tbody>
</table></div><!-- 表格结束 --></form><!-- 表单结束 -->

<form id="searcharc" class="navbar-form" action="{:url('index')}" method="get">
<div class="form-group"><input type="text" name="keyword" id="keyword" class="form-control required" placeholder="搜索关键词..."></div>
<button type="submit" class="btn btn-info" value="Submit">搜索一下</button></form>

<div class="backpages">{$page}</div>
{/block}